﻿namespace AjLogo.Primitives
{
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    using AjLogo.Language;

    public abstract class BinaryPrimitive : IProcedure
    {
        public int Arity { get { return 2; } }

        public object Evaluate(BindingEnvironment environment, params object[] parameters)
        {
            return this.Apply(environment, parameters[0], parameters[1]);
        }

        public abstract object Apply(BindingEnvironment environment, object value1, object value2);
    }
}

